# 轮播图
import xadmin
from xadmin import views
from . import models


class BaseSetting(object):
    """xadmin的基本配置"""
    enable_themes = True  # 开启主题切换功能
    use_bootswatch = True  # 引导控制盘(其实就是我们的左侧菜单栏)


xadmin.site.register(views.BaseAdminView, BaseSetting)


class GlobalSettings(object):
    """xadmin的全局配置"""
    site_title = "路⻜学城"  # 设置站点标题
    site_footer = "路⻜学城有限公司"  # 设置站点的⻚脚
    menu_style = "accordion"  # 设置菜单折叠
xadmin.site.register(views.CommAdminView, GlobalSettings)


class BannerModelAdmin(object):
    list_display = ["title", "orders", "is_show"]
xadmin.site.register(models.Banner, BannerModelAdmin)


class NaxXadmin(object):
    list_display = ['title','link','is_site','is_show']
xadmin.site.register(models.Nav,NaxXadmin)

